define(
		[ "PDUtilDir/grid", "PDUtilDir/searchBlock","PDUtilDir/util"],
		function(Grid, SearchBlock,Util) {
			SearchBlock.init('searchBlockId');
			function init(cache, addObj, updateObj, delObj, searchObj) {

			
				
				// 初始化
				return Grid({
					id : "GirdDivId",
					pageSize : 10,
					index : true,
					multi : true,
					pagination : true,
					cache : false,
					layout : [
							{
								name : "姓名",
								field : "name",
								width:"6%",
								sort : true,
								click : function(e) {
									updateObj.run(e.data.row);
								}
							},
							{
								name : "员工编号",
								field : "personNo",
								sort : true,
								width:"4%",
								click : function(e) {
									updateObj.run(e.data.row);
								}
							},
//							{
//								name : "员工ID",
//								field : "id",
//							
//							},
							{
								name : "标段",
								field : "workerType",
								width:"6%",
								format : function(e) {
									return cache.workerTypeMap.get(e.row.workerType);
								}
							},
							{
								name : "识别角色",
								field : "personRole",
								width:"6%",
								format : function(e) {
									return cache.rolesMap.get(e.row.personRole);
								}
							},
							{
								name : "单位",
								field : "team",
								width:"6%",
								format : function(e) {
									return cache.teamMaps.get(e.row.team);
								}
							},
						
							{
								name : "民族",
								field : "folk",
								width:"4%",
									
							},
							{
								name : "性别",
								field : "sex",
								width:"4%",
							
							},
							{
								name : "出生日期",
								field : "birthDay",
									width:"6%",
							
							},
						
							{
								name : "项目名称",
								field : "projectCode",
								format : function(e) {
									var codes = e.row.projectCode;
									var strs= new Array();
									var pname = "";
									strs=codes.split(",");
									for (i=0;i<strs.length-1 ;i++ ) 
									{ 
										if(i!=0){
											pname+=",";	
										}
										
										pname+=cache.projectsMap.get(strs[i]);
									} 
									return pname;
								}
							},
							{
								name : "身份证号码",
								field : "cardSn",
							},	{
								name : "住址",
								field : "address"
									
							},
							
							],
					toolbar : [ 
				/*		{
						name : "导出",
						icon : "fa fa-plus-circle",
						callback : function(event) {
							addObj.run();
						}
					},*/
					{
						name : "删除",
						icon : "fa fa-trash-o",
						callback : function(event) {
							delObj.run();
						}
					}, {
						name : "查询",
						icon : "fa fa-search",
						callback : function(event) {
							searchObj.run();
						}
					} ],
					data : {
						type : 'URL',
						value : getServer()
								+ '/flea/hclv/person/selectAll.htmls'
					}
				});
			}
			return {
				init : init
			}
		});